package org.nf.web.common.converter;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.unit.DataUnit;
import org.nf.web.common.TypeConverter;

import javax.xml.crypto.Data;

/**
 * @Author czl
 * @Date 2024-05-17
 */
public class DataConverter implements TypeConverter {
    @Override
    public boolean supports(Class<?> paramType) {
        return paramType.equals(Data.class) ;
    }

    @Override
    public Object convert(String requestParam) {
        return DateUtil.parse(requestParam).toJdkDate();
    }
}
